<?php

namespace app\api\model;

use app\api\model\BaseModel;

class Theme extends BaseModel
{
    public function img()
    {
        return $this->belongsTo('Image','topic_img_id','id');
    }

    public function themeProduct()
    {
        return $this->hasMany('ThemeProduct','theme_id','id');
    }

    public static function getThemeId($params = [])
    {
        return self::with("img")->select($params);
    }

    public static function getThemeProduct($id,$page,$size)
    {
        
    }
}
